#!/bin/bash
. functions.sh

echo "--> Begin to download war file from: ${DL_SERVER}, using ${ID_RSA_PATH}"

if [ ! -e /opt/pcs-server ]; then
	mkdir -p /opt/pcs-server
fi

        rsync -av --delete --rsh="ssh -p 333 -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i ${ID_RSA_PATH}" smx@${DL_SERVER}:/opt/www/${DL_SERVER}/pcs-server/latest/pcs-server /opt/pcs-server

echo "--> Begin to download so file"
	rsync -av --rsh="ssh -p 333 -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -i ${ID_RSA_PATH}" smx@${DL_SERVER}:/opt/www/ops30.sumilux.com/sofiles_64 /tmp/
